// bsp6.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main(int argc, char* argv[])
{
	long sum = 0;
	for(int i = 1; i <= 1000; i ++)
	{
		if((i % 3 == 0) || (i % 5 == 0))
		{
			sum += i;
		}
	}
	printf("Sum = %ld", sum);
	getchar();
}

